Improve ipa-tuura Containerfile to fetch code from Git#147
Conversation
This commit updates the Containerfile used to build the ipa-tuura service so that it fetches the code from a Git repository instead of relying on a local folder. This change makes the image easier to build from external projects such as ipalab-config or freeipa-local-tests, enabling better integration and automation.
|
I'm not sure about this change, pulling from git will make it impossible to build the container with local changes, and it would also break GitHub actions. |
|
/retest |
|
|
||
| # Copy the source code | ||
| WORKDIR /www | ||
| RUN git clone https://github.com/freeipa/ipa-tuura ipa-tuura |
There was a problem hiding this comment.
turn the URL into an ARG SOURCE_URL=https://github.com/freeipa/ipa-tuura and then do
ARG SOURCE_URL=../ipa-tuura
ARG SOURCE_CMD=cp -pr
RUN ${SOURCE_CMD} ${SOURCE_URL} ipa-tuura
for local runs where we copy things locally, just don't pass anything or pass the full path with podman-build --build-arg=SOURCE_URL=$(pwd), for cloning remotely use podman-build --build-arg=SOURCE_URL=https://github.com/freeipa/ipa-tuura --build-arg=SOURCE_CMD="git clone".
There was a problem hiding this comment.
or these arguments can be put into a file and then build args file can be specified with podman-build --build-arg-file clone-from-github.args:
$ cat clone-from-github.args
SOURCE_URL=https://github.com/freeipa/ipa-tuura
SOURCE_CMD=git clone
$ podman-build --build-arg-file=./clone-from-github.args ...
We can also turn the defaults around and have local copying be a custom version.
This commit updates the Containerfile used to build the ipa-tuura service so that it fetches the code from a Git repository instead of relying on a local folder. This change makes the image easier to build from external projects such as ipalab-config or freeipa-local-tests, enabling better integration and automation.